﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../MasterPage.Master"
CodeBehind="wfProcPlani.aspx.cs" Inherits="RH.wfProcPlani" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
 <script type="text/javascript">
     window.onload = function () {
         this.ResizeGrid();
         this.MessageOnPostback();
     }

     function ResizeGrid() {
         internalGridResize("<%= grdList.ClientID %>");
     }

     function rowDblClick(rowIndex) {
        var row = getGridRowByIndex('<%= grdList.ClientID %>', rowIndex);
        var objValues = [];
        objValues[0] = getObjInnerText(row.cells[0]);
        objValues[1] = getObjInnerText(row.cells[1]);
        objValues[2] = getObjInnerText(row.cells[2]);
        objValues[3] = getObjInnerText(row.cells[3]);
        objValues[4] = getObjInnerText(row.cells[4]);
        objValues[5] = getObjInnerText(row.cells[5]);
        objValues[6] = getObjInnerText(row.cells[6]);
        objValues[7] = getObjInnerText(row.cells[7]);
        objValues[8] = getObjInnerText(row.cells[8]);
        objValues[9] = getObjInnerText(row.cells[9]);
        window.returnValue = objValues;
        window.close();
     }

     function panelOnUpdating() {
         updatePanelAnimationUpdating();
     }

     function panelOnUpdated() {
         ResizeGrid();
         updatePanelAnimationUpdated();
     }
 </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
    <div class="DataHeader">
         <table id="TableDataHeader" cellpadding="0" cellspacing="0">
            <tr><td colspan="11" >&nbsp;</td></tr>
            <tr>
               <td style=" width:10px;" >             
                   &nbsp;</td>
               <td style=" width:90px;" >
                 Id.Planilla:
               </td>
               <td>
                    <esd:esdTextBox runat="server" ID="txtidPlanilla" Width="100px"></esd:esdTextBox> 
                </td>
               <td style=" width:10px;" >
                   &nbsp;</td>
               <td>
                   Ds.Planilla:</td>
               <td style=" width:90px;" >
                       <esd:esdTextBox runat="server" ID="txtdsPlanilla" Width="350px"></esd:esdTextBox> </td>
               <td>
                       &nbsp;</td>
               <td>
                    &nbsp;</td>
               <td>&nbsp;</td>
               <td>
                   <esd:esdButton ID="bttSearch" Runat="server" Text="Buscar" Width="80px" OnClick="bttOk_Click">
                   </esd:esdButton>
                </td>
               <td style=" width:10px;" >
                   &nbsp;</td>
            </tr>
            <tr><td colspan="11" >&nbsp;</td></tr>
            <tr><td colspan="11" >&nbsp;</td></tr>
         </table>
    </div>
    <div class="DataDetail">
        <esd:esdGridView CssClass="esdGridView" ID="grdList" runat="server" ScrollWidth="100%"
            Width="100%" ShowHeaderWhenEmpty="True" AutoGenerateColumns="False" 
            DataKeyNames="RowNumber" OnRowCreated="grdList_RowCreated">
            <Columns>
            <asp:BoundField DataField="idPlanilla" HeaderStyle-CssClass="hideDataGridColumn"
                ItemStyle-CssClass="hideDataGridColumn">
            </asp:BoundField>
            <asp:BoundField DataField="dsMes" HeaderText="Mes">
            </asp:BoundField>
            <asp:BoundField DataField="dsForPago" HeaderText="Form.Pago"></asp:BoundField>
            <asp:BoundField DataField="dsPlanilla" HeaderText="Planilla">
            </asp:BoundField>
            <asp:BoundField DataField="nuProcAnual" HeaderText="Proceso Anual">
            </asp:BoundField>
            <asp:BoundField DataField="feDesde" HeaderText="Fecha Desde" DataFormatString="{0:dd/MM/yyyy}">
            </asp:BoundField>
            <asp:BoundField DataField="feHasta" HeaderText="Fecha Hasta" DataFormatString="{0:dd/MM/yyyy}">
            </asp:BoundField>
            <asp:BoundField DataField="feProceso" HeaderText="Fecha Proceso" DataFormatString="{0:dd/MM/yyyy}">
            </asp:BoundField>
            <asp:BoundField DataField="dsStProceso" HeaderText="Estado Proceso">
            </asp:BoundField>
            <asp:BoundField DataField="stAnulado" HeaderStyle-CssClass="hideDataGridColumn"
                ItemStyle-CssClass="hideDataGridColumn"></asp:BoundField>
            </Columns>
            <EmptyDataTemplate>
            <div id="gridempty">
                <asp:Image ID="imgEmpty" runat="server" ImageUrl="../Images/Controls/Attention.png" />
                &nbsp;No existen registros para esta solicitud.
            </div>
            </EmptyDataTemplate>
        </esd:esdGridView>
    </div>
     </ContentTemplate> 
</asp:UpdatePanel>
<ajax:UpdatePanelAnimationExtender ID="upae" BehaviorID="animation" runat="server"
    TargetControlID="updatePanel1">
    <animations>
        <OnUpdating>
        <Parallel duration="0.5">
            <ScriptAction Script="panelOnUpdating();" />  
        </Parallel>
        </OnUpdating>
        <OnUpdated>
        <Parallel duration="0.5">
            <ScriptAction Script="panelOnUpdated();" /> 
        </Parallel> 
        </OnUpdated>
    </animations>
</ajax:UpdatePanelAnimationExtender>
<div id="updateProgressDiv" class="updateProgress" style="display: none">
        <table width="100%">
            <tr>
                <td valign="middle">
                    <img src="../Images/Controls/Loading.gif" />
                </td>
                <td valign="middle">
                    <span class="updateProgressMessage">Cargando ...</span>
                </td>
            </tr>
        </table>
</div>
</asp:Content>